<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "admin_goods".
 *
 * @property int $goods_id 商品ID
 * @property string|null $goods_title 商品名称
 * @property string|null $goods_desc 商品描述
 * @property float|null $goods_price 商品价格
 * @property string|null $imageFile 商品图片
 * @property int|null $created_at 商品添加时间
 * @property int|null $goods_status 商品状态
 * @property int|null $merchants_id 商家ID
 */
class Goods extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'admin_goods';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['goods_desc'], 'string'],
            [['goods_price'], 'number'],
            [['created_at', 'goods_status', 'merchants_id'], 'integer'],
            [['goods_title', 'imageFile'], 'string', 'max' => 200],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'goods_id' => 'Goods ID',
            'goods_title' => 'Goods Title',
            'goods_desc' => 'Goods Desc',
            'goods_price' => 'Goods Price',
            'imageFile' => 'Image File',
            'created_at' => 'Created At',
            'goods_status' => 'Goods Status',
            'merchants_id' => 'Merchants ID',
        ];
    }
}
